package com.example.helloworld;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

public class ButtonActivity extends AppCompatActivity {

    private Button butt2;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_button);
        butt2 = findViewById(R.id.btn2);
        butt2.setEnabled(true);
    }
    public void showToast(View view){
        Toast.makeText(this,"按钮被点击",Toast.LENGTH_SHORT).show();
    }
}